package com.sz.springboot_jpa.service;

import com.sz.springboot_jpa.entity.Article;
import com.sz.springboot_jpa.pojo.ResponseCode;

import java.util.List;
import java.util.Optional;

public interface ArticleServer {
    void post(Article article);

    /***
     * 通过文章 id 获取文章
     * @param id
     * @return
     */
    Article findById(Long id);

    ResponseCode find(Integer pageSize, Integer pageNum);

    Optional<Article> showDetailById(Long id);


    Article update(Article article);

    void delById(Long id);
}
